<!DOCTYPE html>
<html>
<head>
	<title>数组解构</title>
</head>
<body>
<script type="text/javascript">
	
/* 数组解构

	1. 可以设置默认值
	2. 最又两边必须严格保持一致
*/

let arr = ['hello', 'word'];
let [arr1, arr2] = arr;
let [a, [b, c], d, e=123] = [1, [2, 3], 4];
console.log(arr1, arr2);
console.log(a, b, c, d, e);

</script>
</body>
</html>